/*
 * @Author: your name
 * @Date: 2022-01-03 17:33:19
 * @LastEditTime: 2022-01-04 21:26:43
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \human resource\src\mixin\index.js
 */
// mixin 混入, 是指可以将一个符合 Vue 配置要求的对象, 合并到组件当中
export default {
    methods: {
        checkPerm(btnName) {
            // 传入按钮名, 如果在用户数据中存在, 就显示按钮
            return this.$store.state.user.profile ? this.$store.state.user.profile.roles.points.includes(btnName) : ''
        }
    }
}